<?php
class DomLanguageTestCase extends UnitTestCase {
	
	public function testTranslate() {
		
		$result = DomLanguage::translate(array('Tere','Head aega'),'et','en');
		$this->assertEqual( $result, array('Hello','Goodbye'));
		
		$result = DomLanguage::translate('Tere','et','en');
		$this->assertEqual( $result, 'Hello');
		
		try {
			$result = DomLanguage::translate('Tere','asdfasdf','en');
			$this->assertTrue(false);
		} catch( RuntimeException $e) {
			$this->assertTrue( $e->getCode() == 400 );
		}
		
		
	}
	
	
}
?>